package com.auto.learning.tools;

import android.app.Dialog;
import android.content.Context;

import com.auto.learning.event.listener.DialogListener;
import com.auto.learning.view.CommonAlertDialog;

public class DownloadRemind {
	private Context context;
	
	public DownloadRemind(Context context){
		this.context = context;
	}
	
	public void showDialog(DialogListener listener){

		CommonAlertDialog alertDialog = new CommonAlertDialog(context);
		alertDialog.setTextMessage("确认退出吗？");
		alertDialog.setShowTitle(true);
		String[] a = {"继续","取消"};
		alertDialog.setBtns(new DialogListener() {

			@Override
			public void okButtonClick(Dialog dialog) {
				dialog.dismiss();
			}

			@Override
			public void cancelButtonClick(Dialog dialog) {
				dialog.dismiss();
			}

			@Override
			public void otherButtonClick(Dialog dialog) {
				dialog.dismiss();
			}}, a);
		alertDialog.show();
	}
}
